/**
 * Created by WYH on 17/1/15.
 */
var SetCommunity = (function () {

    function setupCommunity(element, data) {
        data = data.data;
        var elements = $(element).children();
        elements.remove();
        for (var i = 0; i < data.length; i++) {
            $(element).append("<option>" + data[i]["name"] + "</option>");
        }
    }

    return {
        setupCommunity: setupCommunity
    }


})();